package com.dcy;

import com.dcy.dao.StudentDao;
import com.dcy.domain.Student;
import com.dcy.utils.MyBatisUtil;
import org.apache.ibatis.session.SqlSession;

import java.util.List;

public class starter03 {
    public static void main(String[] args) {
        //测试多个实体类对象对象作为参数
        SqlSession sqlSession= MyBatisUtil.getSqlSession();
        StudentDao studentDao = sqlSession.getMapper(StudentDao.class);
        Student student1=new Student();
        student1.setAge(21);
        Student student2=new Student();
        student2.setAge(25);
        List<Student> studentList = studentDao.selectByMany(student1, student2);
        System.out.println(studentList);
    }
}
